home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text;
-
- import java.awt.event.ActionEvent;
- import java.util.EventObject;
- import javax.swing.JEditorPane;
-
- public class StyledEditorKit$AlignmentAction extends StyledEditorKit.StyledTextAction {
- // $FF: renamed from: a int
- private int field_0;
-
- public StyledEditorKit$AlignmentAction(String var1, int var2) {
- super(var1);
- this.field_0 = var2;
- }
-
- public void actionPerformed(ActionEvent var1) {
- JEditorPane var2 = ((StyledEditorKit.StyledTextAction)this).getEditor(var1);
- if (var2 != null) {
- int var3 = this.field_0;
- if (var1 != null && ((EventObject)var1).getSource() == var2) {
- String var4 = var1.getActionCommand();
-
- try {
- var3 = Integer.parseInt(var4, 10);
- } catch (NumberFormatException var5) {
- }
- }
-
- SimpleAttributeSet var6 = new SimpleAttributeSet();
- StyleConstants.setAlignment(var6, var3);
- ((StyledEditorKit.StyledTextAction)this).setParagraphAttributes(var2, var6, false);
- }
-
- }
- }
-